export function findSubMenuByLabel(menuOptions, targetLabel) {
  for (const menuItem of menuOptions) {
    if (menuItem.label === targetLabel && menuItem.children) {
      return menuItem.children;
    }
    if (menuItem.children) {
      const result = findSubMenuByLabel(menuItem.children, targetLabel);
      if (result) {
        return result;
      }
    }
  }
  return null;
}
